/**
 * 与资产相关的后端接口调用
 */
import instance from '@/utils/http'
import { getAssetOverview,getAssetStatusDistribution,getAssetCategoryDistribution,getAssetValueTrend,getAssetNowValueTrend,getAssetOverview1 } from '@/api/url'


//查询仪表盘前4个数据
export const getAssetOverviewAPI = () => {
    return instance({
        url: getAssetOverview,
        method: 'get',
    })
}

//查询资产概览前4个数据
export const getAssetOverview1API = () => {
    return instance({
        url: getAssetOverview1,
        method: 'get',
    })
}

//后端传来的通过状态分组数据（仪表盘的资产状态分布图，资产状态分布的资产状态饼图和资产状态柱状图）
export const getAssetStatusDistributionAPI = () => {
    return instance({
        url: getAssetStatusDistribution,
        method: 'get',
    })
}

//后端传来的通过分类分组数据（仪表盘的资产分类分布图,资产概览的资产类型分布图）
export const getAssetCategoryDistributionAPI = () => {
    return instance({
        url: getAssetCategoryDistribution,
        method: 'get',
    })
}


//后端传来的资产价值趋势数据（资产概览的资产增长趋势图）
export const getAssetValueTrendAPI = (data) => {
    return instance({
        url: getAssetValueTrend,
        method: 'get',
        data: data
    })
}


//后端传来的资产价值趋势数据（资产概览的资产增长趋势图）(用于初始渲染)
export const getAssetNowValueTrendAPI = () => {
    return instance({
        url: getAssetNowValueTrend,
        method: 'get',
    })
}


